package com.algrithom.graph.hasdirection;

import com.common.constants.NumberConstants;
import com.common.model.GraphMatrix;

/**
 * 邻接矩阵表示有向图
 *
 * @author think
 * @version 1.0.0
 * @since 2020/2/18
 */
public class AdjacentMatrix {
    
    public static void main(String[] args){
        GraphMatrix graphMatrix = new GraphMatrix(NumberConstants.FIVE);
        graphMatrix.getEdge()[0][1] = 1;
        graphMatrix.getEdge()[0][3] = 1;
        graphMatrix.getEdge()[0][4] = 1;
        graphMatrix.getEdge()[1][0] = 1;
        graphMatrix.getEdge()[1][2] = 1;
        graphMatrix.getEdge()[1][4] = 1;
        graphMatrix.getEdge()[2][1] = 1;
        graphMatrix.getEdge()[2][3] = 1;
        graphMatrix.getEdge()[2][4] = 1;
        graphMatrix.getEdge()[3][0] = 1;
        graphMatrix.getEdge()[3][2] = 1;
        graphMatrix.getEdge()[4][0] = 1;
        graphMatrix.getEdge()[4][1] = 1;
        graphMatrix.getEdge()[4][2] = 1;
    }
}
